@echo off

if %JDK_HOME%.==. goto SETHOME

del events\*.class
del memory\*.class

echo Compiling events...
%JDK_HOME%\bin\javac -target 1.1 -bootclasspath ..\ events\*.java memory\*.java
if errorlevel==1 goto ERROR

echo Making jar files...
cd..
%JDK_HOME%\bin\jar cf javax.jar javax\events\*.class javax\memory\*.class
copy javax.jar ..\lib
cd javax

echo Process completed successully
goto EXIT

:ERROR
cd ..
echo Compilation error
goto EXIT

:SETHOME
echo Missing JDK_HOME environment variable. For example: SET JDK_HOME=C:\JDK1.3

:EXIT




